home *** CD-ROM | disk | FTP | other *** search
/ Delphi Informant Complete 1995 - 2000 / Delphi Informant Complete 1995 to 2000.iso / Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar / 1998 / Mar / di9803rs / SNDX.PAS < prev    next >
Pascal/Delphi Source File  |  1997-11-03  |  928b  |  48 lines

  1. unit Sndx;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, ExtCtrls,
  8.   SndxAlgs;
  9.  
  10. type
  11.   TForm1 = class(TForm)
  12.     InputText: TEdit;
  13.     Label1: TLabel;
  14.     CmdEncode: TButton;
  15.     Label2: TLabel;
  16.     Label3: TLabel;
  17.     Panel1: TPanel;
  18.     SoundexLabel: TLabel;
  19.     Panel2: TPanel;
  20.     NumericLabel: TLabel;
  21.     Label4: TLabel;
  22.     Panel3: TPanel;
  23.     ExtendedLabel: TLabel;
  24.     procedure CmdEncodeClick(Sender: TObject);
  25.   private
  26.     { Private declarations }
  27.   public
  28.     { Public declarations }
  29.   end;
  30.  
  31. var
  32.   Form1: TForm1;
  33.  
  34. implementation
  35.  
  36. {$R *.DFM}
  37.  
  38. procedure TForm1.CmdEncodeClick(Sender: TObject);
  39. begin
  40.     SoundexLabel.Caption := Soundex(InputText.Text);
  41.     NumericLabel.Caption :=
  42.         Format('%d', [NumericSoundex(InputText.Text)]);
  43.     ExtendedLabel.Caption := ExtendedSoundex(InputText.Text);
  44. end;
  45.  
  46.  
  47. end.
  48.